package com.nit.lab.service.basic;

import com.nit.lab.dto.basic.GoodsDTO;
import com.nit.lab.dto.basic.GoodsListDTO;
import com.nit.lab.entity.basic.GoodsListEntity;
import com.nit.lab.dto.basic.GoodsDTO;
import com.nit.lab.dto.utils.TableReqDTO;
import com.nit.lab.dto.utils.TableRspDTO;
import com.nit.lab.entity.basic.GoodsEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface GoodsListService {
    /**
     * @Description: 获取表格数据
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    TableRspDTO list4Table(TableReqDTO tableReqDTO) throws Exception;
//注释！
    /**
     * @Description: 更新记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer update(GoodsListDTO goodsListDTO) throws Exception;

    /**
     * @Description: 删除记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer remove1(String listId) throws Exception;

    /**
     * @description: 根据listId获取所有所属商品goodsId
     * @Author: WJM
     * @Date: 2022/7/17 15:35
     **/
    List<GoodsDTO> getGoods(String listId) throws Exception;
    /**
     * @description: 添加一种商品
     * @Author: WJM
     * @Date: 2022/7/16 16:22
     **/
    Integer add(GoodsListDTO goodsListDTO) throws Exception;

    /**
     * @Description: 获取goodsList表格数据
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    List<GoodsListDTO> listGoodsData() throws Exception;


    /**
     * @Description: 获取对应startId的数目
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
     Long getNum(Long startId) throws Exception;

    /**
     * @Description: 通过商品ID获取该商品信息
     * @Author: zb
     * @Date: 2019/01/31 11:02
     */
    List<GoodsListDTO> getGoodsInfo(String listId) throws Exception;
    /**
     * @Description: 根据goodsID获取具体某条商品信息
     * @Author: zb
     * @Date: 2019/01/31 11:02
     */
    List<GoodsDTO> getBasicGoodsInfo(String goodsId) throws Exception;

    /**
     * @description:
     * @Author: WJM
     * @Date: 2022/7/12 2:00
     **/
    List<GoodsEntity> buy(Integer id) throws Exception;

    /**
     * @description:
     * @Author: WJM
     * @Date: 2022/7/12 2:00
     **/

    @Transactional(rollbackFor = Exception.class)
    String bought(String status, Integer id, String owner) throws Exception;


    /**
     * @description:
     * @Author: SKW
     * @Date: 2022/7/12 2:00
     **/
    Integer editStatus(Integer id) throws Exception;

    List<GoodsEntity> getAllGoods(Integer goodsId) throws Exception;
}
